{% extends "admin/base_site.html" %}
{% load i18n static %}

{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/login.css" %}">
{{ form.media }}
{% endblock %}

{% block bodyclass %}{{ block.super }} login{% endblock %}

{% block usertools %}{% endblock %}

{% block nav-global %}{% endblock %}

{% block nav-sidebar %}{% endblock %}

{% block content_title %}{% endblock %}

{% block breadcrumbs %}{% endblock %}

{% block content %}
<div id="content-main">
  <h1>电影推荐系统用户管理</h1>
  {% if form.errors and not form.non_field_errors %}
  <p class="errornote">
    {% if form.errors.items|length == 1 %}请修正下面的错误。{% else %}请修正下面的错误。{% endif %}
  </p>
  {% endif %}

  {% if form.non_field_errors %}
  {% for error in form.non_field_errors %}
  <p class="errornote">
    {{ error }}
  </p>
  {% endfor %}
  {% endif %}

  <div id="content-main">
    <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
      <div class="form-row">
        {{ form.username.errors }}
        {{ form.username.label_tag }} {{ form.username }}
      </div>
      <div class="form-row">
        {{ form.password.errors }}
        {{ form.password.label_tag }} {{ form.password }}
        <input type="hidden" name="next" value="{{ next }}">
      </div>
      <div class="submit-row">
        <input type="submit" value="登录">
      </div>
    </form>
  </div>
</div>
{% endblock %} 